package handler;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.dbutils.ResultSetHandler;

import drh.bean.Evaluate;

public class EvaluateResultSetHandler implements ResultSetHandler<List<Evaluate>> {

	@Override
	public List<Evaluate> handle(ResultSet rs) throws SQLException {
		List<Evaluate>list = new ArrayList<Evaluate>();
		while(rs.next()) {
			Evaluate info = new Evaluate();
			info.setId(rs.getInt("id"));
			info.setUserid(rs.getInt("userid"));
			info.setProductid(rs.getInt("productid"));
			info.setContent(rs.getString("content"));
			info.setTime(rs.getString("time"));
			info.setIsdelete(rs.getInt("isdelete"));
			list.add(info);
		}
		return list;
	}
	
}
